<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	<h:head>
	<title>Update Hotel</title>
</h:head>
<h:body>
	<h:form>
		<p:panel header="Registration Form">
			<h:panelGrid columns="3" id="regGrid">
				


				<h:outputLabel for="name">hotel name:</h:outputLabel>
				<p:inputText id="name" value="#{HotelBean.hotelDTO2.name}" />
				<p:message for="name" />
				
				<h:outputLabel for="city">city:</h:outputLabel>
				<p:inputText id="city" value="#{HotelBean.hotelDTO2.city}" />
				<p:message for="city" />
				
				<h:outputLabel for="stars">number of stars:</h:outputLabel>
				<p:inputText id="stars" value="#{HotelBean.hotelDTO2.stars}" />
				<p:message for="stars" />
				
				<h:outputLabel for="openDate">date of opening:</h:outputLabel>
				<p:inputMask id="openDate"  value="#{HotelBean.hotelDTO2.openDate}" mask="99/99/9999">
                <f:convertDateTime pattern="dd/MM/yyyy" />
                </p:inputMask>
				<p:message for="openDate" />
				
				<h:outputLabel for="closureDate">date of closure:</h:outputLabel>
				<p:inputMask id="closureDate"  value="#{HotelBean.hotelDTO2.closureDate}" mask="99/99/9999">
                <f:convertDateTime pattern="dd/MM/yyyy" />
                </p:inputMask>
				<p:message for="closureDate" />
				
				<h:outputLabel for="price">price per night per person:</h:outputLabel>
				<p:inputText id="price" value="#{HotelBean.hotelDTO2.price}" />
				<p:message for="price" />
				
				<h:outputLabel for="spots">open spots:</h:outputLabel>
				<p:inputText id="spots" value="#{HotelBean.hotelDTO2.spots}" />
				<p:message for="spots" />
				
			</h:panelGrid>
			<p:commandButton value="Update" update="regGrid"
				action="#{HotelBean.update()}" />
		</p:panel>
	</h:form>
</h:body>
	
</html>